$(function () {
  // 鼠标悬停
  $("#main .main-top-b img").on("mouseenter", function () {
    let src = $(this).attr("src");
    $("#main .main-top-l>img").attr("src", src);
  });

  // 点击按钮偏移
  let sum = 0;
  $("#main .main-top-b>span:nth-of-type(1)").on("click", function () {
    if(sum>0) $("#main .main-top-b>ul").scrollLeft((sum -= 90));

  });
  $("#main .main-top-b>span:nth-of-type(2)").on("click", function () {
   if(sum<270)  $("#main .main-top-b>ul").scrollLeft((sum += 90));

  });
});
